package com.centit.suixuan.puremvc.controller
{
	import com.centit.suixuan.puremvc.model.UserProxy;
	import com.centit.suixuan.puremvc.view.LoginMediator;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	public class LoginCommand extends SimpleCommand implements ICommand
	{
		public function LoginCommand()
		{
		}
		
		override public function execute(notification:INotification):void
		{
			
			var loginPanel : LoginPureMVC = notification.getBody() as LoginPureMVC;
			
			facade.registerProxy(new UserProxy(UserProxy.NAME));
			
			facade.registerMediator(new LoginMediator(LoginMediator.NAME, loginPanel));
		}
		
		
	}
}